<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script type="text/javascript" src="__JS__/jquery.js"></script>
    <script type="text/javascript" src="__JS__/user.js"></script>
    <link rel="stylesheet" type="text/css" href="__CSS__/pass.css" />
    <style type="text/css">
        .all366C li{height: 35px;line-height: 35px;}
    </style>
    <title>邮箱找回密码</title>
</head>
<body>
<div class="box">
    <a href="/" target="_blank"><img src="{$logo.login}" /></a>
    <div class="boxm">
        <div class="wrap">
            <form action="{:U('Login/emailPass')}" method="post" name="myForm" id="myForm">
                <input type="hidden" name="email" value="{$info.email}">
                <div>
                    <img id="pic" src="__IMG__/email_pass2.gif" width="747" height="41" />
                    <ul class="all366C" style="margin-top:25px;">
                        <li class="get"><label>您的邮箱号码：</label><input type="text" disabled="disabled" style="width:150px;" id="email" value="{$info.email}" name="mobile" class="txt"><a  onclick="getEmail()" href="javascript:;" class="m1">免费获取验证码</a></li>
                        <li><label>邮箱验证码：</label>
                            <input type="text"  style="width:100px;"  name="code" id="code" class="txt"><span id="codeInfo"></span></li>
                        <li>
                            <a href="javascript:;" onclick="return sub()" class="btnok ok2" >下一步</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>
    </div>
</div>
<script type="text/javascript">
    function getEmail(){
        var email = $("#email").val();
        $.post("{:U('Login/getEmailCode')}",{'email':email},function(data){
            if(data.status==1){
                alert(data.msg);
            }else{
                alert(data.msg);
            }
        });
    }

    function sub(){
        var code = $("#code").val();
        if(code==''){
            alert('验证码不能为空!');
            return false;
        }else if(code.length<5){
            alert('邮箱验证码是6位长度数字!');
            return false;
        }
        $("#myForm").submit();
    }

</script>
</body>
</html>